<template>
  <div class="hello">
    <h1>{{ msg }} - {{ $route.params.username}} - {{ $route.params.id}}</h1>
    <h2>h1111111111 page</h2>
  </div>
</template>

<script>
export default {
  name: 'hi',
  data () {
    return {
      msg: '老子是 h111111 page'
    }
  },
  beforeRouteEnter: (to, from, next) => {
    console.log('准备进入h1路由模板')
    // 可以往下跳转了
    next(true) // next(false)
  },
  beforeRouteLeave: (to, from, next) => {
    console.log('准备离开h1 路由模板')
    // 可以往下跳转了
    next(true) // next(false)
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
